package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.Inspect;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InspectMapper {

    int insertSelective(Inspect record);

    Inspect selectByPrimaryKey(Integer inspectId);

    int updateByPrimaryKeySelective(Inspect record);
    // 查询
    List<Inspect> selectAll(Inspect inspect);
    // 分页计数
    int countInspect(Inspect inspect);
    // 停用/启用/删除
    int definedInspect(@Param("inspectIds") Long[] inspectIds, @Param("dataState") Integer dataState);
    // 编号判重
    Integer queryInspectCode(Inspect inspect);
    // 名称判重
    Integer queryInspectName(Inspect inspect);
    // 通过设备ID查询
    List<Inspect> queryByDevice(@Param("deviceId")Integer deviceId);
    // 新增设备点检作业明细时查询点检项目
    List<Inspect> filterInspectListByInspectIds(@Param("pagesize")Integer pagesize, @Param("incept")Integer incept,@Param("inspectIds") Integer[] inspectIds);
    // 新增设备点检作业明细时查询点检项目(计数)
    int countFilterInspectListByInspectIds(@Param("inspectIds")Integer[] inspectIds);
}